using System;

namespace Atomic.Libraries.Jobs
{
	[Serializable]
	public class MemoryPerProcessOption : IJobSubmitOption
	{
		private int memoryPerProcessor;

		public MemoryPerProcessOption(int memoryPerProcessor)
		{
			if (memoryPerProcessor < 0)
			{
				throw new ArgumentOutOfRangeException();
			}

			//http://rcc.its.psu.edu/user_guides/system_utilities/pbs/
			//#   Request 1 gigabyte of memory per process
			//#PBS -l pmem=1gb

			this.memoryPerProcessor = memoryPerProcessor;
		}

		/// <summary>
		/// Memory per processor (gigabytes).
		/// </summary>
		public int MemoryPerProcessor
		{
			get
			{
				return memoryPerProcessor;
			}
		}
	}
}
